const marked = new showdown.Converter({
    tables: true,
    parseImgDimensions: true,
    strikethrough: true,
    tasklists: true,
    literalMidWordUnderscores: true,
    metadata: true,
    noHeaderId: true,
    emoji: true,
});
const md = document.getElementById("md");

async function renderMarkdown(text) {
    console.log(arguments);
    md.innerHTML = marked.makeHtml(text);

    //代码高亮
    md.querySelectorAll("pre").forEach((i) => {
        hljs.highlightBlock(i);
    });
}

export default renderMarkdown;
